package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.KingOtherInboundMaterialDetailSerialMapper;
import com.ly.heart.service.IKingOtherInboundMaterialDetailSerialService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.KingOtherInboundMaterialDetailSerialEntity;

import javax.annotation.Resource;

/**
 * 金蝶-其他入库单物料明细序列号Service业务层处理
 *
 * @author cxl
 * @date 2024-08-03
 */
@Service
public class KingOtherInboundMaterialDetailSerialServiceImpl extends ServiceImpl<KingOtherInboundMaterialDetailSerialMapper,KingOtherInboundMaterialDetailSerialEntity> implements IKingOtherInboundMaterialDetailSerialService {

    @Resource
    private KingOtherInboundMaterialDetailSerialMapper kingOtherInboundMaterialDetailSerialMapper;

    /**
     * 查询金蝶-其他入库单物料明细序列号
     *
     * @param id 金蝶-其他入库单物料明细序列号ID
     * @return 金蝶-其他入库单物料明细序列号
     */
    @Override
    public KingOtherInboundMaterialDetailSerialEntity selectKingOtherInboundMaterialDetailSerialEntityById(String id)
    {
        return kingOtherInboundMaterialDetailSerialMapper.selectKingOtherInboundMaterialDetailSerialEntityById(id);
    }

    /**
     * 查询金蝶-其他入库单物料明细序列号列表
     *
     * @param kingOtherInboundMaterialDetailSerialEntity 金蝶-其他入库单物料明细序列号
     * @return 金蝶-其他入库单物料明细序列号
     */
    @Override
    public List<KingOtherInboundMaterialDetailSerialEntity> selectKingOtherInboundMaterialDetailSerialEntityList(KingOtherInboundMaterialDetailSerialEntity kingOtherInboundMaterialDetailSerialEntity)
    {
        return kingOtherInboundMaterialDetailSerialMapper.selectKingOtherInboundMaterialDetailSerialEntityList(kingOtherInboundMaterialDetailSerialEntity);
    }

    /**
     * 新增金蝶-其他入库单物料明细序列号
     *
     * @param kingOtherInboundMaterialDetailSerialEntity 金蝶-其他入库单物料明细序列号
     * @return 结果
     */
    @Override
    public int insertKingOtherInboundMaterialDetailSerialEntity(KingOtherInboundMaterialDetailSerialEntity kingOtherInboundMaterialDetailSerialEntity)
    {
        kingOtherInboundMaterialDetailSerialEntity.setCreateTime(DateUtils.getNowDate());
        return kingOtherInboundMaterialDetailSerialMapper.insertKingOtherInboundMaterialDetailSerialEntity(kingOtherInboundMaterialDetailSerialEntity);
    }

    /**
     * 修改金蝶-其他入库单物料明细序列号
     *
     * @param kingOtherInboundMaterialDetailSerialEntity 金蝶-其他入库单物料明细序列号
     * @return 结果
     */
    @Override
    public int updateKingOtherInboundMaterialDetailSerialEntity(KingOtherInboundMaterialDetailSerialEntity kingOtherInboundMaterialDetailSerialEntity)
    {
        return kingOtherInboundMaterialDetailSerialMapper.updateKingOtherInboundMaterialDetailSerialEntity(kingOtherInboundMaterialDetailSerialEntity);
    }

    /**
     * 批量删除金蝶-其他入库单物料明细序列号
     *
     * @param ids 需要删除的金蝶-其他入库单物料明细序列号ID
     * @return 结果
     */
    @Override
    public int deleteKingOtherInboundMaterialDetailSerialEntityByIds(String[] ids)
    {
        return kingOtherInboundMaterialDetailSerialMapper.deleteKingOtherInboundMaterialDetailSerialEntityByIds(ids);
    }

    /**
     * 删除金蝶-其他入库单物料明细序列号信息
     *
     * @param id 金蝶-其他入库单物料明细序列号ID
     * @return 结果
     */
    @Override
    public int deleteKingOtherInboundMaterialDetailSerialEntityById(String id)
    {
        return kingOtherInboundMaterialDetailSerialMapper.deleteKingOtherInboundMaterialDetailSerialEntityById(id);
    }
}
